package model

import (
	"time"
	"gorm.io/gorm"
)

// WeeklyReport 周报
type WeeklyReport struct {
	ID              uint           `gorm:"primarykey" json:"id"`
	UserID          uint           `gorm:"not null" json:"user_id"`
	Username        string         `gorm:"size:50;not null" json:"username"`
	WeekNumber      int           `gorm:"not null" json:"week_number"`
	Year            int           `gorm:"not null" json:"year"`
	StartDate       time.Time      `json:"start_date"`
	EndDate         time.Time      `json:"end_date"`
	WorkDone        string         `gorm:"type:text" json:"work_done"`
	WorkPlan        string         `gorm:"type:text" json:"work_plan"`
	Problems        string         `gorm:"type:text" json:"problems"`
	Status          int           `gorm:"default:0" json:"status"` // 0:草稿 1:已提交 2:已审核
	ReviewerID      uint           `json:"reviewer_id"`
	ReviewerName    string         `gorm:"size:50" json:"reviewer_name"`
	ReviewComments  string         `gorm:"type:text" json:"review_comments"`
	ReviewedAt      *time.Time     `json:"reviewed_at"`
	CreatedAt       time.Time      `json:"created_at"`
	UpdatedAt       time.Time      `json:"updated_at"`
	DeletedAt       gorm.DeletedAt `gorm:"index" json:"-"`
} 